import { _decorator, Component, Node, Prefab, instantiate } from 'cc';
import { PrefabCfg } from '../../../PrefabCfg';
import { Match3ZiUE } from './Match3ZiUE';
const { ccclass, property } = _decorator;

@ccclass('Match3UI')
export class Match3UI extends Component {
    async start() {
        console.log("Match3UI start");
        // let match3ZiUE = await gCtr.res.loadAssetAsync(PrefabCfg.Match3ZiUE.bundleName, PrefabCfg.Match3ZiUE.path, Prefab);

        // let ziNode = instantiate(match3ZiUE);
        // ziNode.setParent(this.node);

        // let ziUE: Match3ZiUE = ziNode.getComponent(Match3ZiUE);
        // ziUE.init();

        await gCtr.res.loadAssetAsync(PrefabCfg.Match3ZiUE.bundleName, PrefabCfg.Match3ZiUE.path, Prefab);
        let ziUE = gCtr.res.instantiate(Match3ZiUE);
        ziUE.node.setParent(this.node);
        ziUE.init();

    }
}


